import Vue from "vue";
import {
  Carousel,
  CarouselItem,
  Button,
  Tabs,
  TabPane,
  Image,
  Loading,
  Form,
  FormItem,
  Input,
  Checkbox,
  Col,
  Row,
  Upload,
} from "element-ui";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import waterfall from "vue-waterfall2";
Vue.use(waterfall);
Vue.use(Carousel)
  .use(CarouselItem)
  .use(Button)
  .use(Tabs)
  .use(TabPane)
  .use(Image)
  .use(Loading)
  .use(Form)
  .use(FormItem)
  .use(Input)
  .use(Checkbox)
  .use(Col)
  .use(Row)
  .use(Upload);

router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next();
});

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
